package com.zzjson.thread.processor;

/**
 * <p>****************************************************************************</p>
 * <p><b>Copyright © 2010-2019 shuncom team All Rights Reserved<b></p>
 * <ul style="margin:15px;">
 * <li>Description : com.zzjson.thread.processor</li>
 * <li>Version     : 1.0.0</li>
 * <li>Creation    : 2019年08月12日</li>
 * <li>@author     : zzy0_0</li>
 * </ul>
 * <p>****************************************************************************</p>
 */
public class App {
	static IRequestProcessor requestProcessor;

	public static void main(String[] args) {
		App app = new App();
		app.setUp();
		Request request = new Request();
		request.setName("foo");
		requestProcessor.process(request);
	}

	public void setUp() {
		PrintProcessor printProcessor = new PrintProcessor();
		printProcessor.start();
		SaveProcessor saveProcessor = new SaveProcessor(printProcessor);
		saveProcessor.start();

		requestProcessor = new PrevProcessor(saveProcessor);
		((PrevProcessor) requestProcessor).start();
	}

}